package com.gzhryc.net_marketing.cloud.account.dao.db;

import com.gzhryc.common.NumberTools;
import com.gzhryc.jdbc.annotaion.Column;
import com.gzhryc.jdbc.annotaion.Id;
import com.gzhryc.jdbc.annotaion.Table;
import com.gzhryc.net_marketing.cloud.account.dao.enums.CloudPayAccountWithdrawOrderEnum;

import java.io.Serializable;
import java.util.Date;

/**
 * 云支付账号取款订单
 * @version 2022-07-13
 */
@Table(name="cloud_pay_account_withdraw_order")
public class CloudPayAccountWithdrawOrder implements Serializable {

    private static final long serialVersionUID = 1L;

	@Id(auto = false)
    @Column(name="trade_no",note = "取款订单号")
    protected String tradeNo;

    @Column(length = 64,note="订单标题")
    protected String title;

    @Column(name = "account_id",notNull = true,note="云支付账号ID")
    protected Long accountId;

    @Column(name = "pay_type", notNull = true,defVal = "2",note = "支付类型")
    protected Integer payType;

    @Column(name="app_id",note="支付AppId")
    protected String appId;

    @Column(notNull = true,note="取款金额")
    protected Integer money;

    @Column(note="实际到账金额")
    protected Integer payMoney;

    //转第三方应用

    @Column(name = "receiving_id",length = 64, note = "收款人ID")
    protected String receivingId;

    @Column(name = "receiving_face_img",length = 255, note = "收款人头像")
    protected String receivingFaceImg;

    @Column(name = "receiving_nickname", note = "收款人昵称")
    protected String receivingNickname;

    @Column(name = "receiving_name", note = "收款人姓名")
    protected String receivingName;

    @Column(name = "receiving_phone",length = 11, note = "收款人手机")
    protected String receivingPhone;

    //执行后参数

    @Column(name = "handle_type",notNull = true,note="处理方式")
    protected Integer handleType;

    @Column(name="operator_type",note = "操作人类型")
    protected Integer operatorType;

    @Column(name="operator",note = "操作人信息")
    protected String operator;

    @Column(name="operate_date",note = "操作时间")
    protected Date operateDate;

    @Column(name="reject_reason",length = 255,note = "驳回原因")
    protected String rejectReason;

    //手动转账信息

    @Column(name = "transfer_type", note = "转账方式")
    protected Integer transferType;

    @Column(name = "transfer_account", length = 64, note = "转账账号")
    protected String transferAccount;

    @Column(name = "transfer_trade_no",length = 64, note = "转账订单编号")
    protected String transferTradeNo;

    //辅助信息

    @Column(notNull = true,defVal = "1",note="订单状态")
    protected Integer state;

    @Column(name = "update_date", note = "修改时间", autoUpdateTime = true)
    protected Date updateDate;

    @Column(name = "create_date", note = "创建时间")
    protected Date createDate;

    public String getTradeNo() {
        return tradeNo;
    }

    public void setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Long getAccountId() {
        return accountId;
    }

    public void setAccountId(Long accountId) {
        this.accountId = accountId;
    }

    public Integer getHandleType() {
        return handleType;
    }

    public void setHandleType(Integer handleType) {
        this.handleType = handleType;
    }

    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public Integer getMoney() {
        return money;
    }

    public void setMoney(Integer money) {
        this.money = money;
    }

    public Integer getPayMoney() {
        return payMoney;
    }

    public void setPayMoney(Integer payMoney) {
        this.payMoney = payMoney;
    }

    public String getReceivingId() {
        return receivingId;
    }

    public void setReceivingId(String receivingId) {
        this.receivingId = receivingId;
    }

    public String getReceivingFaceImg() {
        return receivingFaceImg;
    }

    public void setReceivingFaceImg(String receivingFaceImg) {
        this.receivingFaceImg = receivingFaceImg;
    }

    public String getReceivingNickname() {
        return receivingNickname;
    }

    public void setReceivingNickname(String receivingNickname) {
        this.receivingNickname = receivingNickname;
    }

    public String getReceivingName() {
        return receivingName;
    }

    public void setReceivingName(String receivingName) {
        this.receivingName = receivingName;
    }

    public String getReceivingPhone() {
        return receivingPhone;
    }

    public void setReceivingPhone(String receivingPhone) {
        this.receivingPhone = receivingPhone;
    }

    public String getRejectReason() {
        return rejectReason;
    }

    public void setRejectReason(String rejectReason) {
        this.rejectReason = rejectReason;
    }

    public Integer getOperatorType() {
        return operatorType;
    }

    public void setOperatorType(Integer operatorType) {
        this.operatorType = operatorType;
    }

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public Date getOperateDate() {
        return operateDate;
    }

    public void setOperateDate(Date operateDate) {
        this.operateDate = operateDate;
    }

    public Integer getTransferType() {
        return transferType;
    }

    public void setTransferType(Integer transferType) {
        this.transferType = transferType;
    }

    public String getTransferAccount() {
        return transferAccount;
    }

    public void setTransferAccount(String transferAccount) {
        this.transferAccount = transferAccount;
    }

    public String getTransferTradeNo() {
        return transferTradeNo;
    }

    public void setTransferTradeNo(String transferTradeNo) {
        this.transferTradeNo = transferTradeNo;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getTransferTypeName(){
        return CloudPayAccountWithdrawOrderEnum.TransferType.note(this.transferType);
    }

    public String getHandleTypeName(){
        return CloudPayAccountWithdrawOrderEnum.HandleType.note(this.transferType);
    }

    public String getStateName(){
        return CloudPayAccountWithdrawOrderEnum.State.note(this.state);
    }

    public String getMoneyStr(){
        return NumberTools.getMoneyStr(this.money);
    }

    public String getPayMoneyStr(){
        return NumberTools.getMoneyStr(this.payMoney);
    }
}
